package cn.kgc.springcloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 课工场
 * @date 2023/10/16
 * @description
 */
@RestController
@RequestMapping("config")
@RefreshScope    //  开启自动刷新
public class ConfigController {

    @Value("${name}")
    private String name;

    @RequestMapping("m1")
    public String method1(){
        return "ConfigController name = "+name;
    }
}
